Field of the Invention
The present invention relates to an image processing apparatus and a method for controlling the same, an imaging apparatus, and a monitoring system.
Description of the Related Art
Omnidirectional cameras in which an omnidirectional mirror or an entire circumference fish-eye lens is mounted are imaging apparatuses that capture images of an entire circumferential (360-degree) view at a time, and are used for various applications such as a monitoring camera and robot navigation. An omnidirectional camera in which an entire circumference fish-eye lens is mounted captures a 360-degree fish-eve image in a ring shape or a circular shape, for example. A captured fish-eye image contains distortion, but a cut image, such as a panoramic image or a planar perspective projection image, can be obtained by cutting out an image from the fish-eye image and performing geometric conversion processing thereon.
Japanese Patent Laid-Open No. 2006-115046 discloses a technique of partially cutting out an image obtained by a wide viewing angle camera, such as an omnidirectional camera, and delivering this cut image. Meanwhile, recently, regarding imaging apparatuses such as a network camera, an imaging apparatus capable of changing image quality in respective areas has been proposed. Japanese Patent Laid-Open No. 06-284395 discloses that the data volume of an image is suppressed while increasing the substantial image quality by increasing the image quality in a screen center portion and reducing the image quality in a peripheral portion.
The MPEG standard is known as a moving image compression and encoding technique. An encoding apparatus that encodes a moving image conforming to the MPEG standard determines a target amount of code for each picture based on a target data rate. Then, based on the target amount of code for each picture, the target amount of code is allocated in an averaged manner to all macroblocks that constitute each picture. Thereafter, the quantization step width for encoding each macroblock is determined so as to achieve the target amount of code, and encoding is performed. If this quantization step width is made smaller, the amount of code increases but a high-quality image can be obtained. Accordingly, for example, in the case of increasing the image quality in an area that is set in an image to be encoded, the quantization step width for macroblocks that constitute this area is made smaller than the quantization step width for macroblocks in the other area. Note that, in the HEVC (High Efficiency Video Coding) standard, the quantization step is determined using a unit called a “coding unit”, rather than a macroblock. In any case, in the moving image compression and encoding techniques, the quantization step is determined for each of the rectangular block units, each of which is constituted by a plurality of pixels. Note that, in the moving image compression and encoding techniques, parameters other than the quantization step are also basically determined for each of the rectangular block units.
A case is considered where an area 401, which is to be encoded so as to increase the image quality, is set in a fish-eye image 400, as shown in FIG. 3A. In FIG. 3B, a cut image 450 is an image obtained by cutting out a portion of the fish-eye image 400 that contains distortion, and performing geometric conversion processing to remove the distortion. If the area 401 that is set in the fish-eye image 400 and is to be encoded to have high image quality is expanded in the cut image 450, the area 401 is distorted due to the aforementioned geometric conversion processing and thus becomes an area 451. The area 451 does not have a shape that is based on a macroblock unit, and, in the case of performing encoding for each macroblock as in the MPEG standard, an area that is to be encoded so as to increase the image quality cannot be set in the cut image 450. This point applies not only to the area that is to be encoded so as to increase the image quality, but also to the case of setting an area that is associated with a function that influences the encoding.